import '@/assets/main.css'
import '@/styles/common.scss'
//import CommonVendorForm from '@/views/components/common/CommonVendorForm.vue'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import { createApp } from 'vue'
import { createPinia } from 'pinia'
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'
import App from './App.vue'
import router from './router'
// 定义懒加载插件
import {lazyPlugin} from '@/directives'
import ECharts from 'vue-echarts'
const app = createApp(App)
//app.component('CommonVendorForm', CommonVendorForm)
const pinia = createPinia()
pinia.use(piniaPluginPersistedstate) // 注册持久化插件
app.use(pinia)
app.use(router)
app.use(lazyPlugin)
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}
app.mount('#app')
app.component('v-chart', ECharts)   // ← 就是这句

